using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Mail;

/// <summary>
/// Summary description for email
/// </summary>
namespace utilities
{
    public class email
    {
        public email()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public int sendMail(string to, string cc, string bcc, string subject, string body, string from, string smtpserver)
        {
            try
            {
                SmtpMail.SmtpServer = smtpserver;
                MailMessage msg = new MailMessage();
                msg.From = from;
                msg.To = to;
                msg.Cc = cc;
                msg.Bcc = bcc;
                msg.Subject = subject;
                msg.Body = body;
                SmtpMail.Send(msg);
                return (1);
            }
            catch
            {
                return (0);
            }
        }
    }
}